package cn.visu.dao;


import cn.visu.bean.User;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 程振奇 on 2017/3/13.
 */
@Service
public class UserDao {
@Autowired
private SqlSessionTemplate sqlSessionTemplate;
    public List<User> selectUsers(){
        return sqlSessionTemplate.selectList(User.class.getName()+".select");


    }

    public void insert(User user) {
         sqlSessionTemplate.insert(User.class.getName()+".insert",user);
    }
}
